home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / gr564s.zip / SRC / CONF.HEG < prev    next >
Text File  |  1993-09-07  |  16KB  |  508 lines

  1. /* example RCS compile-time configuration */
  2.  
  3.     /* $Id: conf.heg,v 1.12 1992/07/28 16:12:44 eggert Exp $ */
  4.  
  5. /*
  6.  * This example RCS compile-time configuration describes a host that conforms
  7.  * to Standard C (1990) and Posix 1003.1-1990 and has GNU diff.
  8.  * If you can't get conf.sh to work as described in the Makefile,
  9.  * copy this file to conf.h and edit conf.h by hand; see README.
  10.  */
  11.  
  12. #define exitmain(n) return n /* how to exit from main() */
  13. /* #define _POSIX_SOURCE */ /* Define this if Posix + strict Standard C.  */
  14.  
  15. #include <errno.h>
  16. #include <stdio.h>
  17. #include <time.h>
  18.  
  19. /* Comment out #include lines below that do not work.  */
  20. #include <sys/types.h>
  21. #include <sys/stat.h>
  22. #include <dirent.h>
  23. #include <fcntl.h>
  24. #include <limits.h>
  25. #include <pwd.h>
  26. #include <signal.h>
  27. #include <stdlib.h>
  28. #include <string.h>
  29. /* #include <sys/mman.h> */
  30. #include <sys/wait.h>
  31. #include <unistd.h>
  32. #include <utime.h>
  33. /* #include <vfork.h> */
  34.  
  35. /* Define the following symbols to be 1 or 0.  */
  36. #define has_sys_dir_h 0 /* Does #include <sys/dir.h> work?  */
  37. #define has_sys_param_h 0 /* Does #include <sys/param.h> work?  */
  38. #define has_readlink 0 /* Does readlink() work?  */
  39. #define readlink_isreg_errno EINVAL /* errno after readlink on regular file */
  40.  
  41. /* #undef NAME_MAX */ /* Uncomment this if NAME_MAX is broken.  */
  42.  
  43. #if !defined(NAME_MAX) && !defined(_POSIX_NAME_MAX)
  44. #    if has_sys_dir_h
  45. #        include <sys/dir.h>
  46. #    endif
  47. #    ifndef NAME_MAX
  48. #        ifndef MAXNAMLEN
  49. #            define MAXNAMLEN 14
  50. #        endif
  51. #        define NAME_MAX MAXNAMLEN
  52. #    endif
  53. #endif
  54. #if !defined(PATH_MAX) && !defined(_POSIX_PATH_MAX)
  55. #    if has_sys_param_h
  56. #        include <sys/param.h>
  57. #        define included_sys_param_h 1
  58. #    endif
  59. #    ifndef PATH_MAX
  60. #        ifndef MAXPATHLEN
  61. #            define MAXPATHLEN 1024
  62. #        endif
  63. #        define PATH_MAX (MAXPATHLEN-1)
  64. #    endif
  65. #endif
  66. #if has_readlink && !defined(MAXSYMLINKS)
  67. #    if has_sys_param_h && !included_sys_param_h
  68. #        include <sys/param.h>
  69. #    endif
  70. #    ifndef MAXSYMLINKS
  71. #        define MAXSYMLINKS 20 /* BSD; not standard yet */
  72. #    endif
  73. #endif
  74.  
  75. /* Comment out the typedefs below if the types are already declared.  */
  76. /* Fix any uncommented typedefs that are wrong.  */
  77. /* typedef int mode_t; */
  78. /* typedef int pid_t; */
  79. /* typedef int sig_atomic_t; */
  80. /* typedef unsigned size_t; */
  81. /* typedef int ssize_t; */
  82. /* typedef long time_t; */
  83. /* typedef int uid_t; */
  84.  
  85. /* Comment out the keyword definitions below if the keywords work.  */
  86. /* #define const */
  87. /* #define volatile */
  88.  
  89. /* Define the following symbols to be 1 or 0.  */
  90. #define has_prototypes 1 /* Do function prototypes work?  */
  91. #define has_stdarg 1 /* Does <stdarg.h> work?  */
  92. #define has_varargs 0 /* Does <varargs.h> work?  */
  93. #define va_start_args 2 /* How many args does va_start() take?  */
  94. #if has_prototypes
  95. #    define P(params) params
  96. #else
  97. #    define P(params) ()
  98. #endif
  99. #if has_stdarg
  100. #    include <stdarg.h>
  101. #else
  102. #    if has_varargs
  103. #        include <varargs.h>
  104. #    else
  105.         typedef char *va_list;
  106. #        define va_dcl int va_alist;
  107. #        define va_start(ap) ((ap) = (va_list)&va_alist)
  108. #        define va_arg(ap,t) (((t*) ((ap)+=sizeof(t)))  [-1])
  109. #        define va_end(ap)
  110. #    endif
  111. #endif
  112. #if va_start_args == 2
  113. #    define vararg_start va_start
  114. #else
  115. #    define vararg_start(ap,p) va_start(ap)
  116. #endif
  117.  
  118. #define text_equals_binary_stdio 1 /* Does stdio treat text like binary?  */
  119. #define text_work_stdio 0 /* Text i/o for working file, binary for RCS file?  */
  120. #if text_equals_binary_stdio
  121.     /* Text and binary i/o behave the same, or binary i/o does not work.  */
  122. #    define FOPEN_R "r"
  123. #    define FOPEN_W "w"
  124. #    define FOPEN_WPLUS "w+"
  125. #    define OPEN_O_BINARY 0
  126. #else
  127.     /* Text and binary i/o behave differently.  */
  128.     /* This is incompatible with Posix and Unix.  */
  129. #    define FOPEN_R "rb"
  130. #    define FOPEN_W "wb"
  131. #    define FOPEN_WPLUS "w+b"
  132. #    define OPEN_O_BINARY O_BINARY
  133. #    ifndef O_BINARY
  134. #    define O_BINARY 0
  135. #    endif
  136. #endif
  137. #if text_work_stdio
  138. #    define FOPEN_R_WORK "r"
  139. #    define FOPEN_W_WORK "w"
  140. #    define FOPEN_WPLUS_WORK "w+"
  141. #    define OPEN_O_WORK 0
  142. #else
  143. #    define FOPEN_R_WORK FOPEN_R
  144. #    define FOPEN_W_WORK FOPEN_W
  145. #    define FOPEN_WPLUS_WORK FOPEN_WPLUS
  146. #    define OPEN_O_WORK OPEN_O_BINARY
  147. #endif
  148.  
  149. /* Define or comment out the following symbols as needed.  */
  150. #define bad_chmod_close 0 /* Can chmod() close file descriptors?  */
  151. #define bad_creat0 0 /* Do writes fail after creat(f,0)?  */
  152. #define bad_fopen_wplus 0 /* Does fopen(f,FOPEN_WPLUS) fail to truncate f?  */
  153. #define getlogin_is_secure 0 /* Is getlogin() secure?  Usually it's not.  */
  154. #define has_dirent 1 /* Do opendir(), readdir(), closedir() work?  */
  155. #define has_fchmod 0 /* Does fchmod() work?  */
  156. #define has_fputs 1 /* Does fputs() work?  */
  157. #define has_ftruncate 0 /* Does ftruncate() work?  */
  158. #define has_getuid 1 /* Does getuid() work?  */
  159. #define has_getpwuid 1 /* Does getpwuid() work?  */
  160. #define has_memcmp 1 /* Does memcmp() work?  */
  161. #define has_memcpy 1 /* Does memcpy() work?  */
  162. #define has_memmove 1 /* Does memmove() work?  */
  163. #define has_madvise 0 /* Does madvise() work?  */
  164. #define has_mmap 0 /* Does mmap() work on regular files?  */
  165. /* typedef char *caddr_t; */ /* mmap argument type */
  166. #define mmap_signal SIGBUS /* signal received if you reference nonexistent part of mmapped file */
  167. #define has_rename 1 /* Does rename() work?  */
  168. #define bad_a_rename 0 /* Does rename(A,B) fail if A is unwritable?  */
  169. #define bad_b_rename 0 /* Does rename(A,B) fail if B is unwritable?  */
  170. /* typedef int void; */ /* Some ancient compilers need this.  */
  171. #define VOID (void) /* 'VOID e;' discards the value of an expression 'e'.  */
  172. #define has_seteuid 0 /* Does seteuid() work?  See README.  */
  173. #define has_setuid 1 /* Does setuid() exist?  */
  174. #define has_signal 1 /* Does signal() work?  */
  175. #define signal_args P((int)) /* arguments of signal handlers */
  176. #define signal_type void /* type returned by signal handlers */
  177. #define sig_zaps_handler 0 /* Must a signal handler reinvoke signal()?  */
  178. #define has_sigaction 1 /* Does struct sigaction work?  */
  179. #define has_sigblock 0 /* Does sigblock() work?  */
  180. /* #define sigmask(s) (1 << ((s)-1)) */ /* Yield mask for signal number.  */
  181. #define has_sys_siglist 0 /* Does sys_siglist[] work?  */
  182. typedef ssize_t fread_type; /* type returned by fread() and fwrite() */
  183. typedef size_t freadarg_type; /* type of their size arguments */
  184. typedef void *malloc_type; /* type returned by malloc() */
  185. #define has_getcwd 1 /* Does getcwd() work?  */
  186. #define has_getwd 0 /* Does getwd() work?  */
  187. #define has_mktemp 0 /* Does mktemp() work?  */
  188. #define has_NFS 0 /* Might NFS be used?  */
  189. /* #define strchr index */ /* Use old-fashioned name for strchr()?  */
  190. /* #define strrchr rindex */ /* Use old-fashioned name for strrchr()?  */
  191. #define bad_unlink 0 /* Does unlink() fail on unwritable files?  */
  192. #define has_vfork 0 /* Does vfork() work?  */
  193. #define has_fork 1 /* Does fork() work?  */
  194. #define has_spawn 0 /* Does spawn*() work?  */
  195. #define has_wait 1 /* Does wait() work?  */
  196. #define has_waitpid 1 /* Does waitpid() work?  */
  197. #define RCS_SHELL "/bin/sh" /* shell to run RCS subprograms */
  198. #define has_vfprintf 1 /* Does vfprintf() work?  */
  199. #define has__doprintf 0 /* Does _doprintf() work?  */
  200. #define has__doprnt 0 /* Does _doprnt() work?  */
  201. /* #undef EXIT_FAILURE */ /* Uncomment this if EXIT_FAILURE is broken.  */
  202. #define large_memory 0 /* Can main memory hold entire RCS files?  */
  203. #ifndef LONG_MAX
  204. #define LONG_MAX 2147483647L /* long maximum */
  205. #endif
  206. /* Do struct stat s and t describe the same file?  Answer d if unknown.  */
  207. #define same_file(s,t,d) ((s).st_ino==(t).st_ino && (s).st_dev==(t).st_dev)
  208. #define has_utimbuf 1 /* Does struct utimbuf work?  */
  209. #define CO "/usr/local/bin/co" /* name of 'co' program */
  210. #define COMPAT2 0 /* Are version 2 files supported?  */
  211. #define DATEFORM "%.2d.%.2d.%.2d.%.2d.%.2d.%.2d" /* e.g. 01.01.01.01.01.01 */
  212. #define DIFF "/usr/local/bin/diff" /* name of 'diff' program */
  213. #define DIFF3 "/usr/local/bin/diff3" /* name of 'diff3' program */
  214. #define DIFF3_A 1 /* Does diff3 have an -A option?  */
  215. #define DIFF3_BIN 1 /* Is diff3 user-visible (not the /usr/lib auxiliary)?  */
  216. #define DIFF_FLAGS , "-an" /* Make diff output suitable for RCS.  */
  217. #define DIFF_L 1 /* Does diff -L work? */
  218. #define DIFF_SUCCESS 0 /* DIFF status if no differences are found */
  219. #define DIFF_FAILURE 1 /* DIFF status if differences are found */
  220. #define DIFF_TROUBLE 2 /* DIFF status if trouble */
  221. #define ED "/bin/ed" /* name of 'ed' program (used only if !DIFF3_BIN) */
  222. #define MERGE "/usr/local/bin/merge" /* name of 'merge' program */
  223. #define TMPDIR "/tmp" /* default directory for temporary files */
  224. #define SLASH '/' /* principal filename separator */
  225. #define SLASHes '/' /* `case SLASHes:' labels all filename separators */
  226. #define isSLASH(c) ((c) == SLASH) /* Is arg a filename separator?  */
  227. #define ROOTPATH(p) isSLASH((p)[0]) /* Is p an absolute pathname?  */
  228. #define X_DEFAULT ",v/" /* default value for -x option */
  229. #define ALL_ABSOLUTE 1 /* Do all subprograms satisfy ROOTPATH?  */
  230. #define DIFF_ABSOLUTE 1 /* Is ROOTPATH(DIFF) true?  */
  231. #define SENDMAIL "/bin/mail" /* how to send mail */
  232. #define TZ_must_be_set 0 /* Must TZ be set for gmtime() to work?  */
  233.  
  234.  
  235.  
  236. /* Adjust the following declarations as needed.  */
  237.  
  238.  
  239. #ifndef exiting
  240. #    if __GNUC__ && !__STRICT_ANSI__
  241. #        define exiting volatile /* GCC extension: function cannot return */
  242. #    else
  243. #        define exiting
  244. #    endif
  245. #endif
  246.  
  247. #if has_ftruncate
  248.     int ftruncate P((int,off_t));
  249. #endif
  250.  
  251. /* <sys/mman.h> */
  252. #if has_madvise
  253.     int madvise P((caddr_t,size_t,int));
  254. #endif
  255. #if has_mmap
  256.     caddr_t mmap P((caddr_t,size_t,int,int,int,off_t));
  257.     int munmap P((caddr_t,size_t));
  258. #endif
  259.  
  260.  
  261. /* Posix (ISO/IEC 9945-1: 1990 / IEEE Std 1003.1-1990) */
  262. /* These definitions are for the benefit of non-Posix hosts, and */
  263. /* Posix hosts that have Standard C compilers but traditional include files.  */
  264. /* Unfortunately, mixed-up hosts are all too common.  */
  265.  
  266. /* <fcntl.h> */
  267. #ifdef F_DUPFD
  268.     int fcntl P((int,int,...));
  269. #else
  270.     int dup2 P((int,int));
  271. #endif
  272. #ifdef O_CREAT
  273. #    define open_can_creat 1
  274. #else
  275. #    define open_can_creat 0
  276. #    define O_RDONLY 0
  277. #    define O_WRONLY 1
  278. #    define O_RDWR 2
  279. #    define O_CREAT 01000
  280. #    define O_TRUNC 02000
  281.     int creat P((char const*,mode_t));
  282. #endif
  283. #ifndef O_EXCL
  284. #define O_EXCL 0
  285. #endif
  286.  
  287. /* <pwd.h> */
  288. #if has_getpwuid
  289.     struct passwd *getpwuid P((uid_t));
  290. #endif
  291.  
  292. /* <signal.h> */
  293. #if has_sigaction
  294.     int sigaction P((int,struct sigaction const*,struct sigaction*));
  295.     int sigaddset P((sigset_t*,int));
  296.     int sigemptyset P((sigset_t*));
  297. #else
  298. #if has_sigblock
  299.     /* BSD */
  300.     int sigblock P((int));
  301.     int sigmask P((int));
  302.     int sigsetmask P((int));
  303. #endif
  304. #endif
  305.  
  306. /* <stdio.h> */
  307. FILE *fdopen P((int,char const*));
  308. int fileno P((FILE*));
  309.  
  310. /* <sys/stat.h> */
  311. int chmod P((char const*,mode_t));
  312. int fstat P((int,struct stat*));
  313. int stat P((char const*,struct stat*));
  314. #if has_fchmod
  315.     int fchmod P((int,mode_t));
  316. #endif
  317. #ifndef S_IRUSR
  318. #    ifdef S_IREAD
  319. #        define S_IRUSR S_IREAD
  320. #    else
  321. #        define S_IRUSR 0400
  322. #    endif
  323. #    ifdef S_IWRITE
  324. #        define S_IWUSR S_IWRITE
  325. #    else
  326. #        define S_IWUSR (S_IRUSR/2)
  327. #    endif
  328. #endif
  329. #ifndef S_IRGRP
  330. #    if has_getuid
  331. #        define S_IRGRP (S_IRUSR / 0010)
  332. #        define S_IWGRP (S_IWUSR / 0010)
  333. #        define S_IROTH (S_IRUSR / 0100)
  334. #        define S_IWOTH (S_IWUSR / 0100)
  335. #    else
  336.         /* single user OS -- not Posix or Unix */
  337. #        define S_IRGRP 0
  338. #        define S_IWGRP 0
  339. #        define S_IROTH 0
  340. #        define S_IWOTH 0
  341. #    endif
  342. #endif
  343. #ifndef S_ISREG
  344. #define S_ISREG(n) (((n) & S_IFMT) == S_IFREG)
  345. #endif
  346.  
  347. /* <sys/wait.h> */
  348. #if has_wait
  349.     pid_t wait P((int*));
  350. #endif
  351. #ifndef WEXITSTATUS
  352. #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
  353. #undef WIFEXITED /* Avoid 4.3BSD incompatibility with Posix.  */
  354. #endif
  355. #ifndef WIFEXITED
  356. #define WIFEXITED(stat_val) (!((stat_val) & 255))
  357. #endif
  358.  
  359. /* <unistd.h> */
  360. char *getlogin P((void));
  361. int close P((int));
  362. int isatty P((int));
  363. int link P((char const*,char const*));
  364. int open P((char const*,int,...));
  365. int unlink P((char const*));
  366. /* int _filbuf P((FILE*)); *//* keeps lint quiet in traditional C */
  367. /* int _flsbuf P((int,FILE*)); *//* keeps lint quiet in traditional C */
  368. long pathconf P((char const*,int));
  369. ssize_t write P((int,void const*,size_t));
  370. #ifndef STDIN_FILENO
  371. #    define STDIN_FILENO 0
  372. #    define STDOUT_FILENO 1
  373. #    define STDERR_FILENO 2
  374. #endif
  375. #if has_fork
  376. #    if !has_vfork
  377. #        undef vfork
  378. #        define vfork fork
  379. #    endif
  380.     pid_t vfork P((void)); /* vfork is nonstandard but faster */
  381. #endif
  382. #if has_getcwd || !has_getwd
  383.     char *getcwd P((char*,size_t));
  384. #else
  385.     char *getwd P((char*));
  386. #endif
  387. #if has_getuid
  388.     uid_t getuid P((void));
  389. #endif
  390. #if has_readlink
  391.     ssize_t readlink P((char const*,char*,size_t)); /* BSD; not standard yet */
  392. #endif
  393. #if has_setuid
  394. #    if !has_seteuid
  395. #        undef seteuid
  396. #        define seteuid setuid
  397. #    endif
  398.     int seteuid P((uid_t));
  399.     uid_t geteuid P((void));
  400. #endif
  401. #if has_spawn
  402.     int spawnv P((int,char const*,char*const*));
  403. #    if ALL_ABSOLUTE
  404. #        define spawn_RCS spawnv
  405. #    else
  406. #        define spawn_RCS spawnvp
  407.         int spawnvp P((int,char const*,char*const*));
  408. #    endif
  409. #else
  410.     int execv P((char const*,char*const*));
  411. #    if ALL_ABSOLUTE
  412. #        define exec_RCS execv
  413. #    else
  414. #        define exec_RCS execvp
  415.         int execvp P((char const*,char*const*));
  416. #    endif
  417. #endif
  418.  
  419. /* utime.h */
  420. #if !has_utimbuf
  421.     struct utimbuf { time_t actime, modtime; };
  422. #endif
  423. int utime P((char const*,struct utimbuf const*));
  424.  
  425.  
  426. /* Standard C library */
  427. /* These definitions are for the benefit of hosts that have */
  428. /* traditional C include files, possibly with Standard C compilers.  */
  429. /* Unfortunately, mixed-up hosts are all too common.  */
  430.  
  431. /* <errno.h> */
  432. extern int errno;
  433.  
  434. /* <signal.h> */
  435. #if has_signal
  436.     signal_type (*signal P((int,signal_type(*)signal_args)))signal_args;
  437. #endif
  438.  
  439. /* <stdio.h> */
  440. FILE *fopen P((char const*,char const*));
  441. fread_type fread P((void*,freadarg_type,freadarg_type,FILE*));
  442. fread_type fwrite P((void const*,freadarg_type,freadarg_type,FILE*));
  443. int fclose P((FILE*));
  444. int feof P((FILE*));
  445. int ferror P((FILE*));
  446. int fflush P((FILE*));
  447. int fprintf P((FILE*,char const*,...));
  448. int fputs P((char const*,FILE*));
  449. int fseek P((FILE*,long,int));
  450. int printf P((char const*,...));
  451. int rename P((char const*,char const*));
  452. int sprintf P((char*,char const*,...));
  453. long ftell P((FILE*));
  454. void clearerr P((FILE*));
  455. void perror P((char const*));
  456. #ifndef L_tmpnam
  457. #define L_tmpnam 32 /* power of 2 > sizeof("/usr/tmp/xxxxxxxxxxxxxxx") */
  458. #endif
  459. #ifndef SEEK_SET
  460. #define SEEK_SET 0
  461. #endif
  462. #if has_mktemp
  463.     char *mktemp P((char*)); /* traditional */
  464. #else
  465.     char *tmpnam P((char*));
  466. #endif
  467. #if has_vfprintf
  468.     int vfprintf P((FILE*,char const*,va_list));
  469. #else
  470. #if has__doprintf
  471.     void _doprintf P((FILE*,char const*,va_list)); /* Minix */
  472. #else
  473.     void _doprnt P((char const*,va_list,FILE*)); /* BSD */
  474. #endif
  475. #endif
  476.  
  477. /* <stdlib.h> */
  478. char *getenv P((char const*));
  479. exiting void _exit P((int));
  480. exiting void exit P((int));
  481. malloc_type malloc P((size_t));
  482. malloc_type realloc P((malloc_type,size_t));
  483. void free P((malloc_type));
  484. #ifndef EXIT_FAILURE
  485. #define EXIT_FAILURE 1
  486. #endif
  487. #ifndef EXIT_SUCCESS
  488. #define EXIT_SUCCESS 0
  489. #endif
  490. #if !has_fork && !has_spawn
  491.     int system P((char const*));
  492. #endif
  493.  
  494. /* <string.h> */
  495. char *strcpy P((char*,char const*));
  496. char *strchr P((char const*,int));
  497. char *strrchr P((char const*,int));
  498. int memcmp P((void const*,void const*,size_t));
  499. int strcmp P((char const*,char const*));
  500. size_t strlen P((char const*));
  501. void *memcpy P((void*,void const*,size_t));
  502. #if has_memmove
  503.     void *memmove P((void*,void const*,size_t));
  504. #endif
  505.  
  506. /* <time.h> */
  507. time_t time P((time_t*));
  508.